package com.lu.sb210207;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
// SpringBoot在没配置@ComponentScan的情况下，默认只扫描和主类处于同包下的Class
@ComponentScan({"com.lu.sb210207.components", "com.lu.test.components", "com.lu.test.components.*", "com.lu.sb210207"})
@MapperScan("com.lu.sb210207.mapper")
// 事务注解，在service层添加@transaction即可
@EnableTransactionManagement
@EnableScheduling
public class Sb210207Application {

    public static void main(String[] args) {

        SpringApplication.run(Sb210207Application.class, args);

        System.out.println("项目启动成功！");
    }

}
